home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / utilities / pu060.dms / pu060.adf / boot.asm < prev    next >
Assembly Source File  |  1990-11-02  |  902b  |  30 lines

  1. ;    ColdReboot - the official way to reboot an Amiga
  2. ;
  3. ;    Reboots the machine.  All external memory and peripherals will be
  4. ;    RESET, and the machine will start its power up diagnostics
  5. ;
  6. ;    The MagicResetCode must be used exactly as specified here.
  7. ;    The MagicResetCode must be longword aligned.  Failure to
  8. ;    duplicate the code EXACTLY will result in improper operation
  9. ;    under certain system configurations.
  10.  
  11.  
  12.     XDEF _ColdReboot
  13.     XREF _LVOSupervisor
  14.  
  15. _ColdReboot:
  16.     move.l    4,a6                    ;Get a pointer to ExecBase
  17.     lea.l    MagicResetCode(pc),a5    ;Location of code to run
  18.     jsr        _LVOSupervisor(a6)        ;RUN code in supervisor mode
  19.  
  20. ;---------- MagicResetCode ------ DO NOT CHANGE ------------------
  21.  
  22.     CNOP    0,4                    ;IMPORTANT!  Longword align Do not change
  23.  
  24. MagicResetCode:
  25.     lea.l    2,a0                ;Point to JMP instruction at start of ROM
  26.     RESET                        ;all RAM goes away now
  27.     jmp        (a0)                ;rely on prefetch to execute this
  28.  
  29.     end
  30.